;(function () {
    var len = 0;
    /**
     * login页面的ajax请求
     */
    if(len == 0){
        $("#signin").click(function () {
            len = 1;
            /**
             * 把html的数据封装在一个obj里面
             * @type {{rname: *|jQuery, category: *|jQuery, size: *|jQuery, download: *|jQuery, dropbox: *|jQuery}}
             */
            var obj = {
                "identity": $('#identity').val(),
                "password": $("#password").val(),
            }

            console.log("111111111111111111")

            $.ajax({
                url: "/user/toLogin.do",
                type: "post",
                data: obj,
                success:function(result){
                    if(result.code == 100){
                        alert(result.msg)
                        window.location.href = "/views/webMarkdownEdit/index.jsp";
                    }else{
                        alert(result.msg);
                        window.location.href = "/views/login/index.jsp";
                    }
                }
            });

        });
    }else{
        alert("警告:操作频繁");
    }

}());